package com.lxr.test5002.base;

import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import butterknife.ButterKnife;



/**
 * 类描述:[基础Activity]
 * 说明:
 * @author: LXR-zsm
 * @Date: 2023/12/11 10:24
 */
public abstract class BaseActivity extends AppCompatActivity {
    private static final String TAG = "BaseActivity";

    private int layoutRes;


    public BaseActivity(int layoutRes) {
        this.layoutRes = layoutRes;
    }


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(layoutRes);
        AppManager.getInstance().addActivity(this);
        ButterKnife.bind(this);
        initView(savedInstanceState);
        initData();
        initEvent();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    protected abstract void initView(Bundle savedInstanceState);

    protected abstract void initEvent();

    protected abstract void initData();

}
